package init

import (
	"os"
	"git.oschina.net/YPTArch/basic/sys/config"
	"git.oschina.net/YPTArch/basic/sys/orm"
	"git.oschina.net/YPTArch/basic/sys/redis"
	"git.oschina.net/YPTArch/basic/sys/logs"
	//"git.oschina.net/YPTArch/basic/sys/mgo"
)

func init() {
	//设置日志级别，默认0全部打印
	logs.SetLevel(0)
	//配置自己实例化
	config.Conf = new(config.Config)
	if err := config.LoadConfig(); err != nil {
		os.Exit(1)
	}
	if err := orm.InitMysql(); err != nil {
		os.Exit(1)
	}
	//mgo.NewMgo()
	redis.InitRedis()

}